import 'package:backendview/request/network_service.dart';
import 'package:backendview/routes.dart';
import 'package:backendview/util/log_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:logger/logger.dart';

void main() {
  runApp(const MyApp());
}

final logger = Logger(
  output: AppConsoleOutput(),
);

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      builder: EasyLoading.init(),
      initialBinding: BindingsBuilder(() {
        Get.put<NetworkService>(NetworkService());
      }),
      initialRoute: MainRoutes.home,
      getPages: MainRoutes.pages,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
    );
  }
}
